home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 67 / IOPROG_67A.ISO / soft / Tools / mwsppv4.exe / INSERT GETDOCUMENTTEMPLATE.SCRIPT < prev    next >
Encoding:
Text File  |  1998-12-10  |  856 b   |  29 lines

  1. !!Script
  2. // Copyright ⌐ 1997-1998 - Modelworks Software
  3.  
  4. // Insert script helper for:
  5.  
  6. /**
  7. @Object: static Application 
  8. @Method: getDocumentTemplate - returns a DocumentTemplate object 
  9. matching the fileType. If an exact match cannot be found null 
  10. is returned. The fileType parameter can include a '.' followed 
  11. by the file extension or can just be the file extension. To get the
  12. no file type document template set the fileType to ".".
  13. @Syntax: Application.getDocumentTemplate(fileType) 
  14. @Summary: getDocumentTemplate - returns a DocumentTemplate 
  15. */
  16.  
  17. function DoCommand()
  18. {
  19.   var editor = getActiveEditor();
  20.   if (editor)
  21.   {
  22.     var selection = editor.getSelection();
  23.     editor.replace("Application.getDocumentTemplate(fileType)", selection);
  24.     editor.setActive("Insert Application.getDocumentTemplate");
  25.   }
  26. }
  27.  
  28. !!/Script
  29.